libMymath.so:add.o sub.o
	gcc -shared -o $@ $^
%.o:%.c
	gcc  -c -fPIC $<

.PHONY:clean
clean:
	rm -rf *.o libMymath.so mylib mylib.tgz

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp -rf *.h mylib/include
	cp -rf *.so mylib/lib
	tar -czf mylib.tgz mylib